package com.hkyp.ss.course.web.dto.response;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.hkyp.ss.course.web.dto.base.BaseDTO;
import com.hkyp.ss.course.web.dto.response.base.BaseResponseVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 课评评论的评论
 */
@JsonIgnoreProperties({"hibernateLazyInitializer","handler"})
@Data
public class SecCommentVO extends BaseDTO {


    /**
     * id
     * 自增主键
     */
    @ApiModelProperty(value = "回复id")
    private Long id;

    /**
     * 回复内容
     *
     * 限制长度最长500字
     */
    @ApiModelProperty(value = "回复内容,限制300字")
    private String replyMsg;


    /**
     * 点赞数
     */
    private Integer userLike = 0;



    @ApiModelProperty(value = "发布时间")
    private Long issueTime;

    ////////////////////// User area ////////////////////////////////////////////////////////////////////


    @ApiModelProperty(value = "双方用户")
    private List<CommentUser> users;

    @Data
    public class CommentUser extends BaseResponseVO {
        @ApiModelProperty(value = "用户id")
        private Long uid;

        @ApiModelProperty(value = "用户角色(1:fromUser;0:toUser  1->0)")
        private Integer role;
        /**
         * 用户昵称
         */
        @ApiModelProperty(value = "用户昵称")
        private String nickName;
        /**
         * 头像
         */
        @ApiModelProperty(value = "头像")
        private String avatar;

    }

    public SecCommentVO(){
        super();
    }

}
